package com.bd.learning.properties;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
import cn.hutool.setting.dialect.Props;

/***
 * @Author zhangjg
 * @Description PropsTest
 * @Date 2021/9/26 上午9:35
 **/
public class PropsTest {

    private static final Log log = LogFactory.get();

    private static final Props prop2 = Props.getProp("test-1.properties");
    private static final Props prop1 = Props.getProp("test-1.properties");

    private static final int num = getInit();

    public static void main(String[] args) {

        Props prop = Props.getProp("tinyid_client.properties");
        String s1 = prop.getStr("tinyid.server");
        String s2 = prop.getStr("tinyid.token");
        System.out.println(s1);
        System.out.println(s2);

        System.out.println(prop2.getStr("aaa"));
        System.out.println(prop1.getStr("aaa"));

        log.info("num={}", num);

    }

    private static int getInit() {

        return 10;
    }

}
